package dao

import (
	"gorm.io/gorm"
	"time"
)

type GvaUser struct {
	gorm.Model
	Mobile   string `gorm:"type:varchar(11);not null;comment:'手机号'"`
	Password string `gorm:"type:varchar(50)not null;comment:'密码'"`
}

type GvaExamTitle struct {
	ID            int       `gorm:"type:int;autoincrement;primary;comment:'考试试卷id'"`
	Name          string    `gorm:"type:varchar(50);not null;comment:'试卷名称'"`
	ExamTitleType int8      `gorm:"type:tinyint;default:1;comment:'试卷分类:1-分类1;2-分类2;3-分类3;4-分类4;'"`
	TitleOrigin   int8      `gorm:"type:tinyint;default:1;comment:'题目抽取:1-随机抽取;2-固定抽取'"`
	TitleNum      int       `gorm:"type:int(10);default:100;comment:'试题数量'"`
	CreateTime    time.Time `gorm:"type:datetime;default:0;comment:'发布时间'"`
	CreateName    string    `gorm:"type:varchar(30);not null;comment:'创建人'"`
	Open          int8      `gorm:"type:tinyint;default:1;comment:'是否发布:1-已发布;2-未发布;3-已停用'"`
}
type GvaExam struct {
	ID         int       `gorm:"type:int;autoincrement;primary;comment:'考试试题id'"`
	Type       int8      `gorm:"type:tinyint;default:0;comment:'试题分类:0-主要法律法规摘要;1-主要社会现状'"`
	TitleType  int8      `gorm:"type:tinyint;default:1;comment:'题型分类:1-单选题;2-多选题'"`
	TitleIntro string    `gorm:"type:varchar(255);not null;comment:'题干'"`
	True       int8      `gorm:"type:tinyint;not null;comment:'正确选项:1-A;2-B;3-C;4-D'"`
	Big        int8      `gorm:"type:tinyint;not null;comment:'难度:1-不艰难度;2-容易;3-中等;4-困难'"`
	CreateTime time.Time `gorm:"type:datetime;default:0;comment:'创建日期'"`
}
type Student struct {
	ID         int    `gorm:"type:int;autoincrement;primary;comment:'学生id'"`
	StudentNum string `gorm:"type:varchar(50);not null;comment:'学号'"`
	Name       string `gorm:"type:varchar(30);not null;comment:'学生姓名'"`
	Score      int    `gorm:"type:int(10);not null;comment:'成绩'"`
}
